<template>
  <el-table :data="cartData" style="width: 980px">
    <el-table-column label="项目" prop="name" width="532"></el-table-column>
    <el-table-column label="姓名" prop="price" width="132"></el-table-column>
    <el-table-column label="数量" width="212">
      <template slot-scope="scope">
        <el-input-number v-model="scope.row.count" @change="handleChange" :min="0" label="描述文字"></el-input-number>
      </template>
    </el-table-column>
    <el-table-column label="总价">
      <template slot-scope="scope">
        {{scope.row.price*scope.row.count}}
      </template>
    </el-table-column>
  </el-table>
</template>

<script type="text/ecmascript-6">
  export default {
    props: {
      cartData: {
        type: Array,
        default: () => {
          return []
        }
      }
    },
    methods: {}
  }
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
</style>
